package coupon.action;

public class Coupon {
	
	public static String createCP() {
		String[] spaceCP=new String[10];
		String coupon="";
		int temp;
		
		//쿠폰 발행 로직
		String[] snum={"0","1","2","3","4","5","6","7","8","9",
				"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P",
				"Q","R","S","T","U","V","W","X","Y","Z"};
		
		for(int i=0;i<spaceCP.length;i++){
			if(i!=3){
				temp=(int)(Math.random()*35)+1;
				spaceCP[i]=snum[temp];
			} else {
				spaceCP[i]="-";
			} 
			coupon+=spaceCP[i];
		}
		return coupon;
	}
}
